import {reqcatedata} from "../../api/cate.js"
Page({
  data:{
    catelist:[],
    activeindex:0,
  },
  async getcatedata(){
   const res= await reqcatedata()
   this.setData({
     catelist:res.data
   })
  },
  onShow(){
    this.getcatedata()
  },
  changeactiveindex(e){
    const {index}=e.currentTarget.dataset
    this.setData({
      activeindex:index
    })
  }
})
